package com.aatattoo.light_food_service.service;

import java.util.UUID;

public class IdUtil {
    /**
     *获取随机UUID
     *
     * @return: 32长度随机UUID
     */
    public static String get_UUID(){
        return UUID.randomUUID().toString();
    }

    /**
     *获取随机UUID
     *
     * @return: 64长度随机UUID
     */
    public static String get_UUID64(){
        return getUUID()+getUUID();
    }
    /**
     *简化的UUID，去掉了横线
     *
     * @return: 32位随机UUID
     */
    public static String getUUID(){
        return UUID.randomUUID().toString().replace("-","");
    }

    /**
     *简化的UUID，去掉了横线
     *
     * @return: 64位随机UUID
     */
    public static String getUUID64(){
        return getUUID()+getUUID();
    }
}
